package Homework05;

public class Staff {
    private String name;
    private double Sal;
    private int SalMonth = 12;
    //有一个带薪的月份

    public Staff(String name, double sal) {
        this.name = name;
        Sal = sal;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSal() {
        return Sal;
    }

    public void setSal(double sal) {
        Sal = sal;
    }

    public void setSalMonth(int salMonth) {
        SalMonth = salMonth;
    }

    public int getSalMonth() {
        return SalMonth;
    }

    public void printSal(){
        System.out.println(getName() + "工资为" + (getSal() * getSalMonth()));
    }
}
